Skip to content

Instantly share code, notes, and snippets.

@ulrikdamm
ulrikdamm / gist:8274171
Last active September 11, 2026 22:51
PMX 2.0 file format
# PMX 2.0 file format #
This is a description of the PMX file format. This is used for 3D models in Miku Miku Dance (MMD).
Since I couldn't find any English descriptions of the PMX file format, I've made this, which is translated from http://gulshan-i-raz.geo.jp/labs/2012/10/17/pmx-format1/. I haven't used this file format yet, so please don't ask me what everything means.
An English guide to the PMD file format, which preceeded PMX, can be found here: http://mikumikudance.wikia.com/wiki/MMD:Polygon_Model_Data.
If you want to learn more, there are some open source projects on GitHub which can read this format, so go take a look at them.
Note: fields with type text begins with an int (32 bit) with how many bytes of text the section is.
@Kost9lbrik
Kost9lbrik / 1-READ-ME-FIRST-sim-stutter-fix.md
Last active September 11, 2026 22:40
Fixing sim-racing stutters caused by USB interrupts landing on CPU 0 - step-by-step (iRacing, ACC, AC, any sim)

Fixing sim-racing stutters caused by USB interrupts on CPU 0

A step-by-step for the problem described in the post: random hitches that your in-game FPS counter does not show, often worst over curbs and in busy braking zones.

Works for any sim. Nothing here is iRacing-specific — it is a Windows driver setting.

Total time: about 30 minutes, plus one reboot.

@osa1
osa1 / sprite_parse.py
Created September 8, 2011 18:45
simple script to locate sprites in a sprite sheet
import pygame
import pygame.locals as locals
def check_adjacency(rect, px):
test_rect = pygame.Rect(rect.left-1, rect.top-1, rect.width+2, rect.height+2)
return test_rect.collidepoint(px[0], px[1])
def find_groups(groups, px):
return [grp for grp in groups if check_adjacency(grp, px)]
@ocombe
ocombe / README.md
Last active September 11, 2026 22:23
ChatGPT Conversation Exporter — export all your conversations as JSON + Markdown + ZIP. No dependencies beyond bash, curl, python3.

ChatGPT Conversation Exporter

Export all your ChatGPT conversations as JSON + Markdown + HTML + ZIP. Works with ChatGPT Business/Team/Enterprise accounts (including SSO/Okta).

What's exported

  • JSON — Raw conversation data from the API
  • Markdown — Clean text with headers per message, relative links to downloaded files
  • HTML — ChatGPT-style conversation viewer with sidebar navigation, syntax-highlighted code blocks, and embedded images
@idbrii
idbrii / botw-cedec2017.md
Last active September 11, 2026 22:15
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo
@aarondfrancis
aarondfrancis / audit-your-codebase.md
Created August 14, 2026 15:20
A read-only, agent-orchestrated codebase audit prompt for data structures, state modeling, algorithms, and ownership.

Audit this entire codebase for materially useful simplifications in its data structures, state representation, control flow, algorithms, and ownership.

This is an audit-only exercise. Do not edit files, run tests, implement recommendations, commit, or push. Read-only inspection commands are allowed.

You are the coordinator. Continue until the complete codebase has been reviewed and the final audit is validated.

  1. Establish the coverage contract

Inspect the repository and inventory every identifiable subsystem.

@duyetpt
duyetpt / measure-software-simplicity.md
Last active September 11, 2026 22:12
Meansure software complexity
name measure-software-simplicity
description Measure and report how well a design, pull request, module, service, refactor, or repository follows software-simplicity principles such as Single Responsibility, deep modules, single knowledge ownership, low change amplification, low caller burden, valid-state design, actionable failures, controlled scope, and evidence-based performance work. Use for architecture assessments, code reviews, maintainability audits, refactoring baselines, before-and-after comparisons, and engineering quality reports.

Measure Software Simplicity

Assess simplicity with Goal-Question-Metric (GQM), repository evidence, and a calibrated scorecard. Treat measurements as decision support.

Rules

@joshenders
joshenders / swap.md
Last active September 11, 2026 22:49
Stop making swap partitions

Stop making swap partitions—use swap files instead!

Swap files have had the same performance characteristics as swap partitions for more than 20 years and yet, linux distributions continue to encourage the use of swap partitions during install.

Swap files are easier to use/add/remove/modify/extend after installation. They're better in every way––use swap files!

  1. Create a swap file.

💡 You can use dd for this too but if your filesystem supports it, fallocate is faster.

@stephenhouser
stephenhouser / HamGridSquare.js
Last active September 11, 2026 22:11 — forked from DrPaulBrewer/HamGridSquare.js
find Maidenhead grid square from latitude and longitude
// HamGridSquare.js
// Copyright 2014 Paul Brewer KI6CQ
// License: MIT License http://opensource.org/licenses/MIT
//
// Javascript routines to convert from lat-lon to Maidenhead Grid Squares
// typically used in Ham Radio Satellite operations and VHF Contests
//
// Inspired in part by K6WRU Walter Underwood's python answer
// http://ham.stackexchange.com/a/244
// to this stack overflow question:
@x0nu11byt3
x0nu11byt3 / elf_format_cheatsheet.md
Created February 27, 2021 05:26
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation